<?php if (!defined('THINK_PATH')) exit();?><!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>个人中心</title>
<?php $srconfig = include(getcwd().'/Project/Common/Conf/srconfig.php'); ?>
<meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1.0, minimum-scale=1.0, user-scalable=no" />
<script src="/Public/js/jquery-2.1.1.min.js"></script>
<link href="/Public/Weixin/css/index.css?v=<?php echo rand(0,99);?>" rel="stylesheet" type="text/css">
<link href="/Public/Weixin/css/head.css?v=<?php echo rand(0,99);?>" rel="stylesheet" type="text/css">
   <link href="/ge/css/style.css" type="text/css" rel="stylesheet" />
<style></style>
<script>
$(document).ready(function () { 
   $('.chongzhi').click(function(){
	   $.post("<?php echo U('Ajax/getchongnum');?>",{},function(res){
		   if(res.code==1){
	          var djine = parseFloat($('input[name="djine"]').val());
	          if(!djine){
	            djine = parseFloat($('select[name="djine"]').val());
	          }
	          if(isNaN(djine) || djine < 0){
			     $('.msgbox .txt').text('请输入金额！');
			     $('.msgbox').show();
			     return false;
	          }
	          location.href = "<?php echo U('Chongzhi/chong?ctype=3&djine=');?>"+djine;
		   } else {
			     $('.msgbox .txt').text('今天充值上限，请明天再来！');
			     $('.msgbox').show();
			     return false;
		   }
	   },'json');
   });
   //checkin-balance
   $('#tixian').click(function(){
       $('#tixian').unbind();
	   $(this).unbind();
       //alert('系统维护！请稍侯再试。'); return;
    //==alert('ok');
       <?php if( $userzhanghu['uqianchong'] < intval($srconfig['lowest_withdraw_limit'])*100){ ?>
		    $('.msgbox .txt').text('最少<?php echo $srconfig['lowest_withdraw_limit']; ?>元才能提现！');
		    $('.msgbox').show();
			return false;
       <?php } else { ?>
	   $(this).unbind();
//	   var djine = parseFloat($('#yue').val());
//	   //alert(djine);
//	   if(!djine){
//	       
//	   }
	   //alert(djine);return;
	   //if(djine < 1){
//		    $('.msgbox .txt').text('最少一元才能提现哦！');
//		    $('.msgbox').show();
//			return false;
//	   }
	   //alert('ajax');
	   //alert(djine);return;
	   $.post("<?php echo U('Ajax/getfaqiancishu');?>",{},function(res){
	       //alert(JSON.stringify(res));
		   if(res.cishu < 99){
			   // $.post("<?php echo U('Tixian/fastpay');?>",{
//			        jine: parseFloat($('#yue').val())
//			    },function(jes){
//			        //alert(jes);
//			        $('#ccddeeff').html(jes);
//			    }, 'text');
	       //alert(JSON.stringify({jine: parseFloat($('#yue').val())}));
			    $.post("<?php echo U('Tixian/fastpay');?>",{jine: parseFloat($('#yue').val())},function(jes){
	       //alert(JSON.stringify(jes));
				    if(jes.code == 1){
			           $('.msgbox .txt').text('提现成功！');
		               $('.msgbox').show();
					   $('#yue').text(0);
					}
				    if(jes.code == 2){
			           $('.msgbox .txt').text('系统繁忙，稍后再试！');
		               $('.msgbox').show();
					}
				    if(jes.code == 3){
			           $('.msgbox .txt').text('最少一元才能提现！');
		               $('.msgbox').show();
					}	
				    if(jes.code == 4){
			           $('.msgbox .txt').text('提现申请已提交，请等待工作人员审核');
		               $('.msgbox').show();
					   $('#yue').text(0);
					   setTimeout(function(){
					   	var host = window.location.host;
					   },2000);
					   
					}
				},'json');
		   } else {
			    $('.msgbox .txt').text('今天超过上限，请明天再来！');
		        $('.msgbox').show();
		   }
	   },'json');   
       <?php } ?>
   });
   
   
    $('#checkin-draw').click(function(){
        //alert('ok');
    	$(this).unbind();
    	//var djine = parseFloat($('#checkin-balance').text());
//    	if(!djine){
//    	    djine = parseFloat($('#checkin-balance').val());
//    	}
//    	if(djine < 1){
//    		$('.msgbox .txt').text('最少一元才能提现！');
//    		$('.msgbox').show();
//    		return false;
//    	}
    	$.post("<?php echo U('checkin/checkinDrawCount');?>",{},function(res){
            //alert(JSON.stringify(res));
    		if(res.cishu < 99){
    			$.post("<?php echo U('checkin/checkinDraw');?>",{},function(jes){
            //alert(JSON.stringify(jes));
    				if(jes.code == 1){
    					$('.msgbox .txt').text('提现成功！');
    					$('.msgbox').show();
    					$('#checkin-balance').text(0);
    				}
    				if(jes.code == 2){
    					$('.msgbox .txt').text('系统繁忙，稍后再试！');
    					$('.msgbox').show();
    				}
    				if(jes.code == 3){
    					$('.msgbox .txt').text('最少一元才能提现！');
    					$('.msgbox').show();
    				}	
    			},'json');
    		} else {
    			$('.msgbox .txt').text('今天超过上限，请明天再来！');
    			$('.msgbox').show();
    		}
    	},'json');   
    });
});
</script>

</head>
<body>
  
    <body class="main_background">
        <div class="box padding_bottom02">
            <div class="top_02">
                <img src="/ge/picture/top.png" />
            </div>
            <div class="guang">
                <img id="img" src="/ge/picture/guang.png" />
            </div>
            <div class="center">
                <div class="c_b background_white">
                    <h3 class="title font_red" style="margin-bottom: 0;">
                        ID : <?php echo (session('userid')); ?>
                    </h3>
                    <h3 class="title font_red">
                        下级代理 : <?php echo (intval($jiazunum)); ?>人
                    </h3>
                
                </div>
                <div class="c_b background_white b_r cb_p">
                    <ul class="personal_box">
                        <li>
                          <form action="/codepay/index.php" method="post">
                            <input type="hidden" name="uid" value="<?php echo (session('userid')); ?>"> 
                            <input type="hidden" name="uickname" value="<?php echo ($uickname); ?>"> 
                          
                    
                            <input id="yue" name="money" value="<?php echo ($money); ?>" type="hidden">
                     
                         <li><span>余 额：</span><span class="font_red"> ￥<?php echo ($money); ?></span><a id="tixian" href="javascript:" style="text-align: center; display:none;background-color: #FF0000 !important;" class="info bg_orange">全额提现</a></li> 
						<li>
                            <a href="<?php echo U('Index/daili');?>" class="r_aroow">
                              
                             
                                <span class="bg01">
                                    代理二维码
                                </span>
                            </a>
                        </li>
                        <li>
                            <a href="<?php echo U('Ucenter/hblist');?>" class="r_aroow">
                                <span class="bg02">
                                    中奖记录
                                </span>
                            </a>
                        </li>
                        <li>
                            <a href="<?php echo U('Ucenter/chonglist');?>" class="r_aroow">
                                <span class="bg03">
                                    充值记录
                                </span>
                            </a>
                        </li>
                        <li>
                            <a href="<?php echo U('Index/yongjin');?>" class="r_aroow">
                                <span class="bg04">
                                    佣金记录
                                </span>
                                <a href="my_commission.do" class="r_aroow">
                                </a>
                        </li>
						 <li class="no_border">
                            <a href="<?php echo U('Index/dailixq');?>" class="r_aroow">
                                <span class="bg05">
                                  
                                   代理佣金说明
                                </span>
                                <a href="contact.do" class="r_aroow">
                                </a>
                        </li
                    ></ul>
                </div>
            </div>
        </div>


 
<script>

$(document).ready(function () { 

   var zhanshiboxsetInterval;

   $(function(){	

      /*   

	   if( String(location).indexOf("Wap&c=Index&a=index") == -1 && String(location).indexOf("Wap&c=Index&a=hb") == -1 ){

		    $.post("<?php echo U('Ajax/checkzhanghu');?>",{},function(res){

				if(res.code==1){

					 alert('请先拆红包');

					 $.post("<?php echo U('Ajax/gethbid');?>",{hbid:<?php echo (intval($hb[id])); ?>},function(res){

					     location.href='<?php echo U("hb?hbid=");?>'+res.hbid;

					 },'json');

				}

			},'json');

	   }

	   */

	   $.post("<?php echo U('Ajax/getfaqiancishu');?>",{},function(res){});

	   $.post('<?php echo U("Ajax/fayongjin");?>',{},function(){	});

	   $.post('<?php echo U("Ajax/checkuserhb");?>',{},function(){	});

	   zhanshiboxsetInterval = setInterval(zhanshibox, 10000);

	   zhanshibox();

   });

   $('#qianghongbao').click(function(){

	   $.post("<?php echo U('Ajax/gethbid');?>",{hbid:<?php echo (intval($hbid)); ?>},function(res){

			location.href='<?php echo U("Index/hb?hbid=");?>'+res.hbid;

	   },'json');

   });

   $('#checkdaili').click(function(){

	   $.post("<?php echo U('Ajax/checkdaili');?>",{},function(res){

		   if(res.code == 0){

			   location.href='<?php echo U("Index/kefu");?>';

		   } else {

			   location.href='<?php echo U("Index/daili");?>';

		   }

	   },'json');

   });

   $('.msgbox .but').click(function(){

	    var msgbox = $("input[name='msgbox']").val();

		if(msgbox == 1){

            $.post("<?php echo U('Ajax/checkzhanghu');?>",{hbid:<?php echo (intval($hbid)); ?>},function(res){

				if(res.code==1){

                     location.href = "<?php echo U('Index/index');?>";

				} else {

                     location.href = "<?php echo U('Index/index');?>";

				}

			},'json');

			return false;

		}

		if(msgbox == 2){

            $.post("<?php echo U('Ajax/checkzhanghu');?>",{hbid:<?php echo (intval($hbid)); ?>},function(res){

				if(res.code==1){

					location.href = "<?php echo U('Zhuanpan/index');?>";

				} else {

				    location.href = "<?php echo U('Chongzhi/chong?ctype=2&hbid='.$hbid);?>";

				}

			},'json');

			return false;

		}

		if(msgbox == 3){

            $.post("<?php echo U('Ajax/checkzhanghu');?>",{hbid:<?php echo (intval($hbid)); ?>},function(res){

				if(res.code==1){

					location.href = "<?php echo U('Guaguale/index');?>";

				} else {

				    location.href = "<?php echo U('Chongzhi/chong?ctype=4&hbid='.$hbid);?>";

				}

			},'json');

			return false;

		}

		if(msgbox == 4){

			location.href = "<?php echo U('Ucenter/index');?>";	

			return false;

		}

		$('.msgbox').hide();

   });   

});

function zhanshibox(){

	$.post("<?php echo U('Ajax/zhanshibox');?>",{},function(res){	 

	    $('.zhanshibox').show(500);

	    if(res.code == 1){

		    $('.zhanshibox').hide();

			clearInterval(zhanshiboxsetInterval);

		}   

		$('.zhanshibox p').html(res.html);

		$('.zhanshibox p').fadeIn(500);

	},'json');

	setTimeout(function(){$('.zhanshibox p').fadeOut(500);}, 8000);

}

</script>

<style>

.zhanshibox { position: fixed; top: 0; left: 0; right: 0; height: 24px; background-color: rgba(0,0,0,0.3); text-align: center; font-size: 12px; line-height: 24px; color: #FFF; display: none; z-index: 9; }

.zhanshibox p { display: none; }

.zhanshibox span { color: #3F0; border: #3F0 1px solid; padding-left: 2px; padding-right: 2px; border-radius: 2px; }

</style>

<div class="msgbox">

  <input type="hidden" value="0" name="msgbox">

  <!--

      0无跳转 

      1拆红包 

      2转盘 

      3刮刮卡

      4个人中心

  -->

  <div class="box">

    <p class="title">提示</p>

    <p class="txt">恭喜您获得0元红包</p>

    <p class="but">确定</p>

  </div>

</div>

<div class="zhanshibox">

  <p></p>

</div>

<div id="dengdai">

    <div class="loading">

           <span></span>

           <span></span>

           <span></span>

           <span></span>

           <span></span>

    </div>

</div>

<div style="height:60px;"></div>

<script>

$(document).ready(function(){

    $('.toggle-sub-menu').click(function(){

        //alert(JSON.stringify(this.dataset));

        var selector = '#' + this.dataset.subMenuId;

        

        $('.sub-menu').hide();

        $(selector).fadeIn();

    })

});

</script>

<style>

.sub-menu {

	background: #333333;

    /* height: 50px; */

	position: fixed;

    /* left: 0; *//* bottom: 0; *//* right: 0; */

	padding: 9px 3px;

	width: 20%;

	/*font-size: 0.8em;*/

	

	display: none;

}



.sub-menu li:first-child {

	padding: 1px 0 6px 0;

}

.sub-menu li {

	/*width: 25%;*/

	text-align: center;

	/* float: left; */

	color: #FFF;

	/*border-right: #FFF 1px solid;*/

	border-bottom: darkgrey 1px solid;

	line-height: 14px;

	padding: 6px 0;

}



.sub-menu li:last-child {

	border: none;

	padding: 6px 0 0 0;

}



.sub-menu li a {

	color: #FFF;

}



</style>

<div id="sub-menu-more-game" class="sub-menu" style="bottom: 50px; left: 26%;">

 <!-- <ul>

    <li><a href="<?php echo U('Zhuanpan/index?randres='.rand(100,999));?>">转盘</a></li>

    <li><a href="<?php echo U('Guaguale/index?randres='.rand(100,999));?>">刮刮乐</a></li>

    <li><a href="<?php echo U('Saolei/index?randres='.rand(100,999));?>">扫雷</a></li> 

  </ul>  -->

</div>

<div id="sub-menu-free-game" class="sub-menu" style="bottom: 50px; left: 20%">

  <ul>

    <li><a href="<?php echo U('Checkin/index?randres='.rand(100,999));?>">签到</a></li>

    <li><a href="<?php echo U('Appraise/scoreboard?randres='.rand(100,999));?>">分享有奖</a></li>

  </ul>

</div>
<link rel="stylesheet" href="/xin/css/weui.min.css">
    <link rel="stylesheet" href="/xin/css/jquery-weui.min.css">
    <link rel="stylesheet" href="/xin/css/base.css">
    <link rel="stylesheet" href="/xin/css/animate.css">
<link rel="stylesheet" href="/xin/css/font_619806_a9lgrdc9i0jxlxr.css">
    <link rel="stylesheet" href="/xin/css/iconfont.css">
    <link rel="stylesheet" href="/xin/css/iconfont_1.css">
<footer class="footer">
    <div class="weui-tabbar">
        <a href="<?php echo U('Index/index?randres='.rand(100,999));?>" class="weui-tabbar__item dl ">
            <div class="weui-tabbar__icon">
                <img class="iconfont" src="/xin/picture/jie.png"  aria-hidden="true" alt="">
            </div>
            <p class="weui-tabbar__label">抢红包</p>
        </a>
	
        <a href="<?php echo U('Ucenter/index?randres='.rand(100,999));?>" class="weui-tabbar__item dl ">
            <div class="weui-tabbar__icon">
                <img class="iconfont" src="/xin/picture/jie.png"  aria-hidden="true" alt="">
            </div>
            <p class="weui-tabbar__label">代理</p>
        </a>
        <a href="<?php echo U('Index/kefu');?>" class="weui-tabbar__item kf ">
            <div class="weui-tabbar__icon">
                <img class="iconfont" src="/xin/picture/jie.png"  aria-hidden="true" alt="">
            </div>
            <p class="weui-tabbar__label">客服</p>
        </a>
    </div>
</footer>


</body>
</html>